import 'package:json_annotation/json_annotation.dart';

part 'dungeons.g.dart';

@JsonSerializable()
class CheckpointDungeons {
  final List<DungeonsList> dungeonList;
  final List<DungeonsGroups> groups;

  CheckpointDungeons({this.dungeonList, this.groups});

  factory CheckpointDungeons.fromJson(Map<String, dynamic> json) =>
      _$CheckpointDungeonsFromJson(json);

  Map<String, dynamic> toJson() => _$CheckpointDungeonsToJson(this);
}

@JsonSerializable()
class DungeonsList {
  final String name;
  final String id;
  final int unlockLevel;
  final int complete;
  final int total;
  final int unlocked;
  final String desc;
  final String pic;

  DungeonsList(
      {this.name,
      this.id,
      this.unlockLevel,
      this.complete,
      this.total,
      this.unlocked,
      this.pic,
      this.desc});

  factory DungeonsList.fromJson(Map<String, dynamic> json) =>
      _$DungeonsListFromJson(json);

  Map<String, dynamic> toJson() => _$DungeonsListToJson(this);
}

@JsonSerializable()
class DungeonsGroups {
  final int groupId;
  final String name;
  final int lowLevel;
  final int highLevel;

  DungeonsGroups({this.groupId, this.name, this.lowLevel, this.highLevel});

  factory DungeonsGroups.fromJson(Map<String, dynamic> json) =>
      _$DungeonsGroupsFromJson(json);

  Map<String, dynamic> toJson() => _$DungeonsGroupsToJson(this);
}
